#ifndef READERMETHOD_H
#define READERMETHOD_H

#include "structinterface.h"
#include "readermethod_global.h"



class READERMETHODSHARED_EXPORT ReaderMethod
{
private:
    int     m_nType;
    unsigned char   *m_btAryBuffer;
public:
    ReaderMethod();
    ~ReaderMethod();

public:
    string     GetSendMsg(unsigned char* btArySenderData, int btArySenderDataLen); //发送数据
    string     GetSendMsg(unsigned char btReadId, unsigned char btCmd);
    string     GetSendMsg(unsigned char btReadId, unsigned char btCmd, unsigned char* btAryData, int btAryDataLen);
    unsigned char    CheckValue(unsigned char* btAryData); //校验值
    string     Reset(unsigned char btReadId); //复位读写器
    string     SetUartBaudrate(unsigned char btReadId, int nIndexBaudrate); //设置串口通讯波特率
    string     GetFirmwareVersion(unsigned char btReadId); //读取读写器固件版本
    string     SetReadAddress(unsigned char btReadId, unsigned char btNewReadId); //设置读写器地址
    string     SetWorkAntenna(unsigned char btReadId, unsigned char btWorkAntenna); //设置读写器工作天线
    string     GetWorkAntenna(unsigned char btReadId); //查询当前工作天线
    string     SetOutputPower(unsigned char btReadId, unsigned char btOutputPower); //设置读写器射频输出功率
    string     GetOutputPower(unsigned char btReadId); //查询读写器当前输出功率
    string     MeasureReturnLoss(unsigned char btReadId, unsigned char btFrequency);
    string     SetFrequencyRegion(unsigned char btReadId, unsigned char btRegion, unsigned char btStartRegion, unsigned char btEndRegion); //设置读写器工作频率范围
    string     SetUserDefineFrequency(unsigned char btReadId, int nStartFreq, unsigned char btFreqInterval, unsigned char btChannelQuantity);
    string     GetFrequencyRegion(unsigned char btReadId); //查询读写器工作频率范围
    string     SetBeeperMode(unsigned char btReadId, unsigned char btMode); //设置蜂鸣器状态
    string     GetReaderTemperature(unsigned char btReadId); //查询当前设备的工作温度
    string     GetAntImpedanceMatch(unsigned char btReadId, unsigned char btFrequery);
    string     SetDrmMode(unsigned char btReadId, unsigned char btDrmMode);
    string     GetDrmMode(unsigned char btReadId);
    string     ReadGpioValue(unsigned char btReadId); //读取GPIO电平
    string     WriteGpioValue(unsigned char btReadId, unsigned char chooseGpio, unsigned char btGpioValue); //设置GPIO电平
    string     SetAntDetector(unsigned char btReadId, unsigned char btDetectorStatus); //设置天线连接检测器状态
    string     GetAntDetector(unsigned char btReadId); //读取天线连接检测器状态
    string     GetMonzaStatus(unsigned char btReadId);
    string     SetMonzaStatus(unsigned char btReadId, unsigned char btMonzaStatus);
    string     SetRadioProfile(unsigned char btReadId, unsigned char btProfile);
    string     GetRadioProfile(unsigned char btReadId);
    string     GetReaderIdentifier(unsigned char btReadId);
    string     SetReaderIdentifier(unsigned char btReadId, unsigned char* identifier);
    string     Inventory(unsigned char btReadId, unsigned char byRound);
    string     CustomizedInventory(unsigned char btReadId, unsigned char session, unsigned char target, unsigned char byRound);
    string     ReadTag(unsigned char btReadId, unsigned char btMemBank, unsigned char btWordAdd, unsigned char btWordCnt);
    string     WriteTag(unsigned char btReadId, unsigned char* btAryPassWord, unsigned char btMemBank, unsigned char* btWordAdd, unsigned char btWordCnt, unsigned char* btAryData, int btAryDataLen);
    string     LockTag(unsigned char btReadId, unsigned char* btAryPassWord, unsigned char btMemBank, unsigned char btLockType);
    string     KillTag(unsigned char btReadId, unsigned char* btAryPassWord);
    string     SetAccessEpcMatch(unsigned char btReadId, unsigned char btMode, unsigned char btEpcLen, unsigned char* btAryEpc);
    string     CancelAccessEpcMatch(unsigned char btReadId, unsigned char* epcstr, int epcLen, unsigned char btMode);
    string     GetAccessEpcMatch(unsigned char btReadId);
    string     InventoryReal(unsigned char btReadId, unsigned char btRound);
    string     FastSwitchInventory(unsigned char btReadId, unsigned char* btAryData, int aryDataLen);
    string     GetInventoryBuffer(unsigned char btReadId);
    string     GetAndResetInventoryBuffer(unsigned char btReadId);
    string     GetInventoryBufferTagCount(unsigned char btReadId);
    string     ResetInventoryBuffer(unsigned char btReadId);
    string     SetBufferDataFrameInterval(unsigned char btReadId, unsigned char btInterval);
    string     GetBufferDataFrameInterval(unsigned char btReadId);
    string     InventoryISO18000(unsigned char btReadId);
    string     ReadTagISO18000(unsigned char btReadId, unsigned char* btAryUID, unsigned char btWordAdd, unsigned char btWordCnt);
    string     WriteTagISO18000(unsigned char btReadId, unsigned char* btAryUID, unsigned char btWordAdd, unsigned char btWordCnt, unsigned char* btAryBuffer, int btAryBufferLen);
    string     LockTagISO18000(unsigned char btReadId, unsigned char* btAryUID, unsigned char btWordAdd);
    string     QueryTagISO18000(unsigned char btReadId, unsigned char* btAryUID, unsigned char btWordAdd);

};


#endif // READERMETHOD_H
